package com.iqiyi.pps.epg.core.model.carousel;

import com.iqiyi.pps.epg.core.model.program.ProgramData;
import com.iqiyi.pps.epg.core.utils.DateTimeUtil;

/**
 * Created by karkarrotxu on 2015/7/10.
 */
public class ProgramNodeElement {
    private long id;
    private int live;
    private long startPlayTime;
    private long endPlayTime;
    private long duration;
    private int lockStatus;
    private long advertDuration;

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getStartPlayTime() {
        return startPlayTime;
    }

    public void setStartPlayTime(long startPlayTime) {
        this.startPlayTime = startPlayTime;
    }

    public long getEndPlayTime() {
        return endPlayTime;
    }

    public void setEndPlayTime(long endPlayTime) {
        this.endPlayTime = endPlayTime;
    }

    public long getDuration() {
        return duration;
    }

    public void setDuration(long duration) {
        this.duration = duration;
    }

    public int getLive() {
        return live;
    }

    public void setLive(int live) {
        this.live = live;
    }

    public int getLockStatus() {
        return lockStatus;
    }

    public void setLockStatus(int lockStatus) {
        this.lockStatus = lockStatus;
    }

    public boolean isTypeLive() {
        return live == ProgramData.TYPE_LIVE;
    }

    public long getAdvertDuration() {
        return advertDuration;
    }

    public void setAdvertDuration(long advertDuration) {
        this.advertDuration = advertDuration;
    }

    public long getAdvertStartTime() {

        return startPlayTime -  this.advertDuration;
    }

    public void setAdvertStartTime(long startTime) {
        startPlayTime = startTime + this.advertDuration;
    }
}
